home *** CD-ROM | disk | FTP | other *** search
Makefile | 1995-07-30 | 2.3 KB | 98 lines | [TEXT/ttxt] |
- # Makefile
- # to build and test the general image processing package
- #
- # To build the library, you may want to edit the list of the library modules
- # below (MODULES). Say, if you don't need/want filtering, remove all the names
- # that contain 'filter' from MODULES= below. Then make the modules you left
- # into the library by
- # make lib
- # simple 'make' would suffice, too.
- #
- # To verify the library, do
- # make check-all
- # or, more specifically,
- # make vimage (checks general image processing)
- # make vrectangle (checks operations over rectangular areas)
- # make vimage_io (reading/writing of various image formats)
- # make vfilter (checks diff. filtartion and LUT ops)
- # make vmorph_filter (checks the morphological filtration)
- # make vfractal_map (checks and shows off cloud generation)
- #
- # Note, this Makefile was built (and works under) GNU make 3.71
- #
- # Please check RANLIB below and adjust it to your system if necessary
- # (it was made for a BSD-like system)
- #
- CC=$(HOME)/bin/c++
- CCL=$(HOME)/bin/c++l
- .SUFFIXES: .cc
- MODULES=image.cc image_rect.cc read_pgm.cc write_pgm.cc \
- read_xwd.cc write_xwd.cc read_tiff.cc write_tiff.cc \
- median_filter.cc conv_filter.cc fractal_map.cc morph_filter.cc
- LIBRARY=libimage.a
- #RANLIB = (ar d $(LIBRARY) __.SYMDEF || true); ranlib $(LIBRARY) # for BSD
- RANLIB = /bin/true # for Solaris 2.x, HP/UX and other SysV-based
-
-
- # Rules, new style
-
- %.o : %.cc
- $(CC) $*.cc
-
- % : %.o $(LIBRARY)
- $(CCL) $< $(LIBRARY) -o $@
- ./$@
-
- % :: %.cc
- $(CC) $*.cc
- $(CCL) $*.o $(LIBRARY) -o $@
- ./$@
-
- # Rules, old style
- #.o: $*.o $(LIBRARY)
- # $(CCL) $*.o $(LIBRARY) -o $*
- # ./$*
- #.cc: $*.cc $(LIBRARY)
- # $(CC) $*.cc
- # $(CCL) $*.o $(LIBRARY) -o $*
- # ./$*
- #.cc.o:
- # $(CC) $*.cc
- #
-
- # Primary goal
-
- # Library
-
- lib: $(LIBRARY)
- .PHONY: lib
- .PRECIOUS: $(LIBRARY)
-
- $(LIBRARY):: $(MODULES)
- # Compile the source files that have been changed
- $(CC) $?
- listobj=`echo $? | sed s/.cc/.o/g` ; \
- ar rv $(LIBRARY) $$listobj && \
- rm $$listobj
- $(RANLIB)
-
- # Verification routines
- check-all: vimage vrectangle vimage_io vfilter vmorph_filter \
- vfractal_map
-
- #vimage: vimage.o libimage.a
- # $(CCL) vimage.o libimage.a -o vimage
- # ./vimage
-
- # Specific dependent goals
-
-
- # Dependence rules
-
- $(LIBRARY):: image.h
- $(MAKE) -W image.cc lib
- $(MAKE) -W image_rect.cc lib
-
- vimage_io.o: image.h
-
-